from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
d=webdriver.Firefox()
d.get('https://www.baidu.com/')
mylink=d.find_element_by_partial_link_text('hao1')
mylink.click()
sleep(2)
d.back()